/**
 * @file utils_timer.h
 * @brief 
 * @author  ()
 * @version 1.0
 * @date 2024-11-04
 * @ingroup common
 * 
 * @copyright Copyright (C) 2019 Queclink Wireless Solutions (ShenZhen) Co., Ltd. All Rights Reserved.
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-11-04 <td>1.0     <td>     <td>内容
 * </table>
 */
#ifndef __UTILS_TIMER_H
#define __UTILS_TIMER_H

#include <stdint.h>

typedef struct {
    uint64_t time;
} utils_time_t;


void     utils_time_init(utils_time_t *timer);

void     utils_time_start(utils_time_t *timer);

uint64_t utils_time_spend(utils_time_t *start);

uint64_t utils_time_left(utils_time_t *end);

uint64_t utils_time_is_expired(utils_time_t *timer);

uint64_t utils_time_get_ms(void);

void     utils_time_countdown_ms(utils_time_t *timer, uint64_t millisecond);


#endif